home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
autofx
/
savebufferas_mpeg.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
1KB
|
68 lines
/*
* $VER: SaveBufferAs_MPEG.ifx 2.5 (27.02.96)
* Copyright © 1992-1996 Nova Design, Inc.
* Written by Thomas Krehbiel
*
* Encode an MPEG stream from a series of frames. Uses third-party
* MPEG encoder software.
*
* Inputs:
* Word(Arg(1),1) = Frame number (1 - N)
* Word(Arg(1),2) = Main filename ("-" if not specified)
* Word(Arg(1),3) = Swap filename ("-" if not specified)
* Word(Arg(1),4) = Sequence number
* Word(Arg(1),5) = Total number of frames (N)
*
* Returns:
* 0 if successful, non-zero on failure
*
*/
OPTIONS RESULTS
base = 'Autofx_MPEG_'
framenum = Word(Arg(1),1)
mainname = Word(Arg(1),2)
swapname = Word(Arg(1),3)
seq = Word(Arg(1),4)
framemax = Word(Arg(1),5)
newpath = GETCLIP(base||'Path'||seq)
neww = GETCLIP(base||'Width'||seq)
newh = GETCLIP(base||'Height'||seq)
xing = GETCLIP(base||'Xing'||seq)
/* gracefully exit if no buffer */
GetMain
IF rc ~= 0 THEN EXIT 0
IF RIGHT(newpath,1) ~= ':' THEN newpath = newpath || '/'
newname = newpath||'mpeg_temp'||framenum
/* fix: no longer assumes 'xing' is a boolean */
IF xing ~= 0 THEN DO
neww = 160
newh = 120
END
GetPrefs Undo
prevundo = result
Undo Off
GetPrefs SaveNails
prevnail = result
SetPrefs SaveNails Off
Scale neww newh
IF rc ~= 0 THEN EXIT rc
SaveBufferAs YUVSplit newname
IF rc ~= 0 THEN EXIT rc
SetPrefs SaveNails prevnail
Undo prevundo
EXIT